#week_04思考题
# names = [.....]
# 想找出重名的名字 ------> rename = [..]？
#
# 循环遍历每一个元素---->[]
# 如果遍历到某一个前面出现过，存到一个[]
# 计算重名个数？ '''

#思考题
names = ["Monday","Tuesday","Weekend","Wednesday","Thursday","Friday","Friday","Weekend"]

rename = []

for index, name in enumerate(names):
    for name2 in names[index+1:]:
        if name==name2:
            rename.append(name)

print(rename)
print("共有{}个重复的名字".format(len(rename)))